<template>
  <div>
    <h1>小老弟</h1>
    <div>
      <!-- <router-link to="/home/music/1/3min">华语music</router-link>
      <router-link to="/home/music/2/4min">粤语music</router-link>
      <router-link to="/home/music/3/5min">英语music</router-link> -->


      <!-- to对象的写法 -->
       <!-- 
        注意事项:
          - to的对象写法中,如果和params一起使用,
              则不能书写path,只能使用name
          - 可选的params参数,要么不写,
              要么写一个undefined做为值,不能书写一个空字符串
       -->
      <router-link
        :to="{
          name:'music',
          params:{
            id:'1',
             //time: '',    不能为空
            time:undefined
          }
        }"
      >华语</router-link>

      <router-link
        :to="{
          name: 'music',
          params: {
            id: '2',
            time: undefined,
          },
        }"
        >粤语</router-link
      >

      <router-link
        :to="{
          name: 'music',
          params: {
            id: '3',
            time: undefined,
          },
        }"
        >英语</router-link
      >
    </div>

    <router-view></router-view>
  </div>
</template>

<script>
export default {
  name: "Home",
};
</script>

<style>
</style>